<?php
/**
 * Navigation for admin subpages.
 *
 * @author Honza
 */
class NavigationEmployee implements ISubNavigation {
  public static function getContent() {
    if (!isset($_GET[self::SUBKEY])) {
      return self::getDefault();
    }
    
    $iMainBody = NULL;
    
    switch ($_GET[self::SUBKEY]) {
      case 'books':
        $iMainBody = new ContentEmployeeBooks();
        break;
      case 'lending':
        $iMainBody = new ContentEmployeeLending();
        break;
      case 'returning':
        $iMainBody = new ContentEmployeeReturning();
        break;
      case 'libcard':
        $iMainBody = new ContentEmployeeLibCard();
        break;
      case 'news':
        $iMainBody = new ContentEmployeeNews();
        break;
      default:
        return self::getDefault();
        break;
    }

    return self::wrap($iMainBody);
  }

  public static function getDefault() {
    return self::wrap(new ContentEmployeeLending());
  }  
  
  private static function wrap($iMainBody) {
    return MainBody::getMainBodyContent($iMainBody);
  }
}

?>
